//
//  LibView.swift
//  MyLib
//
//  Created by everyu on 4/15.
//

import SnapKit
public class LibView: UIView {
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        backgroundColor = .lightGray
        let ges = UITapGestureRecognizer(target: self, action: #selector(tapOnView))
        addGestureRecognizer(ges)
    }
    
    @objc func tapOnView() {
        let v = UIView()
        addSubview(v)
        v.backgroundColor = .blue
        v.snp.makeConstraints { make in
            make.center.equalToSuperview()
            make.width.equalTo(20)
            make.height.equalTo(20)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
